<div class="page company">
    <div class="action-bar">
        <div class="row">
            <div class="col-sm-12">
                <form>
                    <div class="row">
                        <div class="col-sm-3">
                            <input type="text" class="form-control"
                                   placeholder="请输入查询条件"
                                   ng-model="search"/>
                        </div>

                        <div class="col-sm-3">
                            <input type="text" class="form-control" ng-model-options="options"
                                   is-open="startDateOpened"
                                   datepicker-popup="yyyy-MM-dd" show-button-bar="true"
                                   current-text="今天" clear-text="清空" close-text="关闭"
                                   placeholder="开始日期" ng-click="startDateOpened=true"
                                   ng-model="startTime">
                        </div>

                        <div class="col-sm-3">
                            <input type="text" class="form-control" ng-model-options="options"
                                   is-open="endDateOpened"
                                   datepicker-popup="yyyy-MM-dd" show-button-bar="true"
                                   current-text="今天" clear-text="清空" close-text="关闭"
                                   placeholder="结束日期" ng-click="endDateOpened=true"
                                   ng-model="endTime">
                        </div>
                        <div class="col-sm-1">
                            <button class="btn btn-primary" ng-click="searchEvent()">
                                查询
                            </button>
                        </div>
                        <div class="col-sm-2">
                            <button class="btn btn-success pull-right" ng-click="addEvent()">
                                <i class="fa fa-plus"></i>
                                添加活动
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            <!--<div class="col-sm-4">
                <button class="btn btn-success pull-right" ng-click="addUser()" btn-auth="user.post">
                    增加用户
                </button>
            </div>-->
        </div>
    </div>
</div>

<div class="panel page-content">
    <div ng-if="events.length<=0" class="nodata"></div>
    <table class="table table-hover" ng-if="events.length>0">
        <thead>
        <tr>
            <th>标题</th>
            <th>内容</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="e in events">
            <td style="max-width: 130px;">{{e.title}}</td>
            <td style="max-width: 300px;">{{e.content}}</td>
            <td>
                {{e.startTime | date:"yyyy-MM-dd"}}
            </td>
            <td>{{e.endTime | date:"yyyy-MM-dd"}}</td>
            <td >
                <button class="btn btn-success btn-md mr10" ng-click="update(e)" >编辑</button>
                <button class="btn btn-danger btn-md mr10" ng-click="delete(e)" >删除</button>
            </td>
        </tr>
        </tbody>
    </table>

    <div class="text-center">
        <pagination total-items="pager.totalItems" ng-model="pager.pageNo"
                    items-per-page="pager.pageSize" ng-change="searchEvent()"
                    previous-text="上一页" next-text="下一页" max-size="3"></pagination>
    </div>
</div>




